@extends('oms-backend::layouts.default')

@section ('title','同步日志')

@section('breadcrumbs')

    <h2>同步日志</h2>
    <ol class="breadcrumb">
        <li><a href="{!!route('admin.store.index')!!}"><i class="fa fa-dashboard"></i> 首页</a></li>
        <li class="active">同步日志</li>
    </ol>

@endsection

@section('content')

    <div class="tabs-container">
        <ul class="nav nav-tabs">
            <li class="{{ Active::query('type','Stock') }}"><a href="{{route('admin.oms.file.syncLogs',['type'=>'Stock'])}}">库存同步日志
                    </a></li>
            <li class="{{ Active::query('type','InvupStock') }}"><a href="{{route('admin.oms.file.syncLogs',['type'=>'InvupStock'])}}">实时增量库存同步日志
                </a></li>
            <li class="{{ Active::query('type','OrderSendShip') }}"><a href="{{route('admin.oms.file.syncLogs',['type'=>'OrderSendShip'])}}"> 发货同步日志
                    </a></li>
            <li class="{{ Active::query('type','OrderReturnShip') }}"><a href="{{route('admin.oms.file.syncLogs',['type'=>'OrderReturnShip'])}}"> 退货同步日志
                </a></li>
        </ul>
        <div class="tab-content">
            <div id="tab-1" class="tab-pane active">
                <div class="panel-body">
                    <div class="box-body table-responsive">
                        <table class="table table-hover table-bordered">
                            <tbody>
                            <!--tr-th start-->
                            <tr>
                                <th>文件路径</th>
                                <th>创建时间</th>
                                <th>操作</th>
                            </tr>
                            <!--tr-th end-->

                            @foreach ($logs as $item)
                                <tr>
                                    <td><a href="{{$item->file}}">{{$item->file}}</a></td>
                                    <td>{{$item->created_at}}</td>
                                    <td>
                                        <a
                                                class="btn btn-xs btn-primary"
                                                href="{{route('admin.oms.file.showLogs',['id'=>$item->id])}}">
                                            <i data-toggle="tooltip" data-placement="top"
                                               class="fa fa-pencil-square-o"
                                               title="查看"></i></a>
                                    </td>
                                </tr>
                            @endforeach
                            </tbody>
                            <tfoot>
                            <tr>
                                <td colspan="7" class="footable-visible">
                                    {!! $logs->render() !!}
                                </td>
                            </tr>
                            </tfoot>
                        </table>
                    </div><!-- /.box-body -->
                </div>
            </div>
        </div>
    </div>

@endsection

@section('after-scripts-end')

@stop